import request from '@/utils/request'

// 获取权限查看
export const syspermission = () => {
  return request({
    url: '/sys/permission'
  })
}

// 添加权限
export const syspermissionadd = (data) => {
  request({
    url: '/sys/permission',
    method: 'POST',
    data
  })
}

// 编辑权限节点
export const syspermissionidbianji = (data) => {
  request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}

// 删除权限点
export const syspermissioniddel = (data) => {
  request({
    url: `/sys/permission/${data.id}`,
    method: 'DELETE'
  })
}
